﻿
using System;

namespace Transport.Areas.Administrator.Models
{
    public class ParcelPackagingGroupModel
    {
        public int ParcelPackagingGroupId { get; set; }
        public string CreateUser { get; set; }
        public int CreateUserId { get; set; }
        public int MyOfficeId { get; set; }
        public DateTime CreateDate { get; set; }
        public string RegionName { get; set; }
        public int RegionId { get; set; }
    }

    public class ParcelPackagingItemModel
    {
        public int ParcelPackagingItemId { get; set; }
        public int ParcelPackagingGroupId { get; set; }
        public int ParcelId { get; set; }
        public int? CustomerId { get; set; }
        private string _customerName;
        public string CustomerName
        {
            get
            {
                return !CustomerId.HasValue ? "Khách lẻ" : _customerName;
            }
            set
            {
                _customerName = value;
            }
        }
        public string TrackingNumbers { get; set; }
        public string DeliverFrom { get; set; }
        public string DeliverToName { get; set; }
        public int TotalWeight { get; set; }
        public decimal TotalCost { get; set; }
        public DateTime DateOfSending { get; set; }
        public string ToAddress { get; set; }
        public string TotalCostCollect { get { return TotalCost == 0 ? string.Empty : String.Format("{0:0,0}", TotalCost); } }
        public string Note { get; set; }
    }
}